xen/arm: clean and invalidate all guest caches by VMID after domain build.
authorIan Campbell <ian.campbell@citrix.com>
Tue, 11 Feb 2014 14:11:02 +0000 (14:11 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 12 Feb 2014 12:48:45 +0000 (12:48 +0000)
commited250c269831f01e92ea93bc7be3f3fdaa69e280
tree3c1db224df0b86d7207ae75760c153011af4d690
parent6172853047d49d2a031d4426268df3cbd30cb57a
xen/arm: clean and invalidate all guest caches by VMID after domain build.

Guests are initially started with caches disabled and so we need to make sure
they see consistent data in RAM (requiring a cache clean) but also that they
do not have old stale data suddenly appear in the caches when they enable
their caches (requiring the invalidate).

This can be split into two halves. First we must flush each page as it is
allocated to the guest. It is not sufficient to do the flush at scrub time
since this will miss pages which are ballooned out by the guest (where the
guest must scrub if it cares about not leaking the pagecontent). We need to
clean as well as invalidate to make sure that any scrubbing which has occured
gets committed to real RAM. To achieve this add a new cacheflush_page function,
which is a stub on x86.

Secondly we need to flush anything which the domain builder touches, which we
do via a new domctl.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Cc: keir@xen.org
17 files changed:
tools/libxc/xc_dom_boot.c
tools/libxc/xc_dom_core.c
tools/libxc/xc_domain.c
tools/libxc/xc_private.c
tools/libxc/xc_private.h
xen/arch/arm/domctl.c
xen/arch/arm/mm.c
xen/arch/arm/p2m.c
xen/common/page_alloc.c
xen/include/asm-arm/arm32/page.h
xen/include/asm-arm/arm64/page.h
xen/include/asm-arm/p2m.h
xen/include/asm-arm/page.h
xen/include/asm-x86/page.h
xen/include/public/domctl.h
xen/xsm/flask/hooks.c
xen/xsm/flask/policy/access_vectors